MakeRGBPat
MakeRGBPat Provides best possible RGB match on current device #include <Quickdraw.h> Color Quickdraw
PixPatHandle thePpat ; the pixel pattern to create in memory RGBColor *myColor ; closest match to the requested RGB color components
MakeRGBPat generates a pixPat that approximates the requested color. thePpat is the handle of the pixel pattern to create in memory.
myColor is the closest match to the requested RGB currently available.
Notes: MakeRGBPat generates the closest possible color match to the requested RGB, given the current equipment. On a device with 4 bits per pixel,
MakeRGBPat will yield 125 possible colors -- as opposed to 16 colors on the same device if you'd just set the foreground color and commenced
drawing.
MakeRGBPat makes more colors theoretically possible by alternating between four colors in a pattern. While this gives you an increased range
of colors, the alternating color selection doesn't allow for a very solid
pattern and should be avoided when using elements that are one pixel wide.
Each 8-by-8 pattern component is composed of computed colors. Colors
are arranged in an RGB pattern as follows (with pattern map boundary
always containing (0,0,8,8) and the rowbytes equal to 2:
Value RGB
0 computed RGB color
1 computed RGB color
2 computed RGB color
3 computed RGB color
For each color table it creates, MakeRGBPat only fills in the last colorSpec field. All the other values for colorSpec are computed on the
current device's pixel depth when the figure is drawn.